<?php
$tdatauoms=array();
	$tdatauoms[".NumberOfChars"]=80; 
	$tdatauoms[".ShortName"]="uoms";
	$tdatauoms[".OwnerID"]="";
	$tdatauoms[".OriginalTable"]="uoms";


	
//	field labels
$fieldLabelsuoms = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsuoms["English"]=array();
	$fieldToolTipsuoms["English"]=array();
	$fieldLabelsuoms["English"]["id"] = "Id";
	$fieldToolTipsuoms["English"]["id"] = "";
	$fieldLabelsuoms["English"]["uom_name"] = "Uom Name";
	$fieldToolTipsuoms["English"]["uom_name"] = "";
	$fieldLabelsuoms["English"]["uom_code"] = "Uom Code";
	$fieldToolTipsuoms["English"]["uom_code"] = "";
	$fieldLabelsuoms["English"]["pack_uom_id"] = "Pack Uom";
	$fieldToolTipsuoms["English"]["pack_uom_id"] = "";
	if (count($fieldToolTipsuoms["English"])){
		$tdatauoms[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Hong Kong S.A.R.)")
{
	$fieldLabelsuoms["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldToolTipsuoms["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldLabelsuoms["Chinese (Hong Kong S.A.R.)"]["id"] = "Id";
	$fieldToolTipsuoms["Chinese (Hong Kong S.A.R.)"]["id"] = "";
	$fieldLabelsuoms["Chinese (Hong Kong S.A.R.)"]["uom_name"] = "Uom Name";
	$fieldToolTipsuoms["Chinese (Hong Kong S.A.R.)"]["uom_name"] = "";
	$fieldLabelsuoms["Chinese (Hong Kong S.A.R.)"]["uom_code"] = "Uom Code";
	$fieldToolTipsuoms["Chinese (Hong Kong S.A.R.)"]["uom_code"] = "";
	$fieldLabelsuoms["Chinese (Hong Kong S.A.R.)"]["pack_uom_id"] = "Pack Uom Id";
	$fieldToolTipsuoms["Chinese (Hong Kong S.A.R.)"]["pack_uom_id"] = "";
	if (count($fieldToolTipsuoms["Chinese (Hong Kong S.A.R.)"])){
		$tdatauoms[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Taiwan)")
{
	$fieldLabelsuoms["Chinese (Taiwan)"]=array();
	$fieldToolTipsuoms["Chinese (Taiwan)"]=array();
	$fieldLabelsuoms["Chinese (Taiwan)"]["id"] = "Id";
	$fieldToolTipsuoms["Chinese (Taiwan)"]["id"] = "";
	$fieldLabelsuoms["Chinese (Taiwan)"]["uom_name"] = "Uom Name";
	$fieldToolTipsuoms["Chinese (Taiwan)"]["uom_name"] = "";
	$fieldLabelsuoms["Chinese (Taiwan)"]["uom_code"] = "Uom Code";
	$fieldToolTipsuoms["Chinese (Taiwan)"]["uom_code"] = "";
	$fieldLabelsuoms["Chinese (Taiwan)"]["pack_uom_id"] = "Pack Uom Id";
	$fieldToolTipsuoms["Chinese (Taiwan)"]["pack_uom_id"] = "";
	if (count($fieldToolTipsuoms["Chinese (Taiwan)"])){
		$tdatauoms[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="French")
{
	$fieldLabelsuoms["French"]=array();
	$fieldToolTipsuoms["French"]=array();
	$fieldLabelsuoms["French"]["id"] = "Id";
	$fieldToolTipsuoms["French"]["id"] = "";
	$fieldLabelsuoms["French"]["uom_name"] = "Uom Name";
	$fieldToolTipsuoms["French"]["uom_name"] = "";
	$fieldLabelsuoms["French"]["uom_code"] = "Uom Code";
	$fieldToolTipsuoms["French"]["uom_code"] = "";
	$fieldLabelsuoms["French"]["pack_uom_id"] = "Pack Uom Id";
	$fieldToolTipsuoms["French"]["pack_uom_id"] = "";
	if (count($fieldToolTipsuoms["French"])){
		$tdatauoms[".isUseToolTips"]=true;
	}
}


	
	$tdatauoms[".NCSearch"]=true;

	

$tdatauoms[".shortTableName"] = "uoms";
$tdatauoms[".nSecOptions"] = 0;
$tdatauoms[".recsPerRowList"] = 1;	
$tdatauoms[".tableGroupBy"] = "0";
$tdatauoms[".mainTableOwnerID"] = "";
$tdatauoms[".moveNext"] = 1;




$tdatauoms[".showAddInPopup"] = false;

$tdatauoms[".showEditInPopup"] = false;

$tdatauoms[".showViewInPopup"] = false;


$tdatauoms[".fieldsForRegister"] = array();

$tdatauoms[".listAjax"] = true;

	$tdatauoms[".audit"] = false;

	$tdatauoms[".locking"] = false;
	
$tdatauoms[".listIcons"] = true;
$tdatauoms[".edit"] = true;
$tdatauoms[".inlineEdit"] = true;
$tdatauoms[".view"] = true;

$tdatauoms[".exportTo"] = true;

$tdatauoms[".printFriendly"] = true;

$tdatauoms[".delete"] = true;

$tdatauoms[".showSimpleSearchOptions"] = true;

$tdatauoms[".showSearchPanel"] = true;


$tdatauoms[".isUseAjaxSuggest"] = true;

$tdatauoms[".rowHighlite"] = true;


// button handlers file names

$tdatauoms[".addPageEvents"] = false;

$tdatauoms[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatauoms[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatauoms[".isUseTimeForSearch"] = false;

$tdatauoms[".isUseiBox"] = false;



$tdatauoms[".isUseInlineAdd"] = true;

$tdatauoms[".isUseInlineEdit"] = true;
$tdatauoms[".isUseInlineJs"] = $tdatauoms[".isUseInlineAdd"] || $tdatauoms[".isUseInlineEdit"];

$tdatauoms[".allSearchFields"] = array();

$tdatauoms[".globSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatauoms[".allSearchFields"]))
{
	$tdatauoms[".allSearchFields"][] = "id";	
}
$tdatauoms[".globSearchFields"][] = "uom_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("uom_name", $tdatauoms[".allSearchFields"]))
{
	$tdatauoms[".allSearchFields"][] = "uom_name";	
}
$tdatauoms[".globSearchFields"][] = "uom_code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("uom_code", $tdatauoms[".allSearchFields"]))
{
	$tdatauoms[".allSearchFields"][] = "uom_code";	
}
$tdatauoms[".globSearchFields"][] = "pack_uom_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("pack_uom_id", $tdatauoms[".allSearchFields"]))
{
	$tdatauoms[".allSearchFields"][] = "pack_uom_id";	
}


$tdatauoms[".googleLikeFields"][] = "id";
$tdatauoms[".googleLikeFields"][] = "uom_name";
$tdatauoms[".googleLikeFields"][] = "uom_code";
$tdatauoms[".googleLikeFields"][] = "pack_uom_id";



$tdatauoms[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatauoms[".allSearchFields"])) 
{
	$tdatauoms[".allSearchFields"][] = "id";	
}
$tdatauoms[".advSearchFields"][] = "uom_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("uom_name", $tdatauoms[".allSearchFields"])) 
{
	$tdatauoms[".allSearchFields"][] = "uom_name";	
}
$tdatauoms[".advSearchFields"][] = "uom_code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("uom_code", $tdatauoms[".allSearchFields"])) 
{
	$tdatauoms[".allSearchFields"][] = "uom_code";	
}
$tdatauoms[".advSearchFields"][] = "pack_uom_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("pack_uom_id", $tdatauoms[".allSearchFields"])) 
{
	$tdatauoms[".allSearchFields"][] = "pack_uom_id";	
}

$tdatauoms[".isTableType"] = "list";


	

$tdatauoms[".isDisplayLoading"] = true;

$tdatauoms[".isResizeColumns"] = false;





$tdatauoms[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatauoms[".strOrderBy"] = $gstrOrderBy;
	
$tdatauoms[".orderindexes"] = array();

$tdatauoms[".sqlHead"] = "SELECT id,   uom_name,   uom_code,   pack_uom_id";
$tdatauoms[".sqlFrom"] = "FROM uoms";
$tdatauoms[".sqlWhereExpr"] = "";
$tdatauoms[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatauoms[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatauoms[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatauoms[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "uoms";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatauoms["id"]=$fdata;
//	uom_name
	$fdata = array();
	$fdata["strName"] = "uom_name";
	$fdata["ownerTable"] = "uoms";
		$fdata["Label"]="Uom Name"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "uom_name";
	
		$fdata["FullName"]= "uom_name";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatauoms["uom_name"]=$fdata;
//	uom_code
	$fdata = array();
	$fdata["strName"] = "uom_code";
	$fdata["ownerTable"] = "uoms";
		$fdata["Label"]="Uom Code"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "uom_code";
	
		$fdata["FullName"]= "uom_code";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatauoms["uom_code"]=$fdata;
//	pack_uom_id
	$fdata = array();
	$fdata["strName"] = "pack_uom_id";
	$fdata["ownerTable"] = "uoms";
		$fdata["Label"]="Pack Uom"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="uom_name";
				$fdata["LookupTable"]="pack_uoms";
	$fdata["LookupOrderBy"]="";
																$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "pack_uom_id";
	
		$fdata["FullName"]= "pack_uom_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 4;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatauoms["pack_uom_id"]=$fdata;

	
$tables_data["uoms"]=&$tdatauoms;
$field_labels["uoms"] = &$fieldLabelsuoms;
$fieldToolTips["uoms"] = &$fieldToolTipsuoms;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["uoms"] = array();

	
// tables which are master tables for current table (detail)
$masterTablesData["uoms"] = array();

$mIndex = 1-1;
			$strOriginalDetailsTable="pack_uoms";
	$masterTablesData["uoms"][$mIndex] = array(
		  "mDataSourceTable"=>"pack_uoms"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "pack_uoms"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 0
	);	
		$masterTablesData["uoms"][$mIndex]["masterKeys"][]="id";
		$masterTablesData["uoms"][$mIndex]["detailKeys"][]="pack_uom_id";

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto488=array();
$proto488["m_strHead"] = "SELECT";
$proto488["m_strFieldList"] = "id,   uom_name,   uom_code,   pack_uom_id";
$proto488["m_strFrom"] = "FROM uoms";
$proto488["m_strWhere"] = "";
$proto488["m_strOrderBy"] = "";
$proto488["m_strTail"] = "";
$proto489=array();
$proto489["m_sql"] = "";
$proto489["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto489["m_column"]=$obj;
$proto489["m_contained"] = array();
$proto489["m_strCase"] = "";
$proto489["m_havingmode"] = "0";
$proto489["m_inBrackets"] = "0";
$proto489["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto489);

$proto488["m_where"] = $obj;
$proto491=array();
$proto491["m_sql"] = "";
$proto491["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto491["m_column"]=$obj;
$proto491["m_contained"] = array();
$proto491["m_strCase"] = "";
$proto491["m_havingmode"] = "0";
$proto491["m_inBrackets"] = "0";
$proto491["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto491);

$proto488["m_having"] = $obj;
$proto488["m_fieldlist"] = array();
						$proto493=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "uoms"
));

$proto493["m_expr"]=$obj;
$proto493["m_alias"] = "";
$obj = new SQLFieldListItem($proto493);

$proto488["m_fieldlist"][]=$obj;
						$proto495=array();
			$obj = new SQLField(array(
	"m_strName" => "uom_name",
	"m_strTable" => "uoms"
));

$proto495["m_expr"]=$obj;
$proto495["m_alias"] = "";
$obj = new SQLFieldListItem($proto495);

$proto488["m_fieldlist"][]=$obj;
						$proto497=array();
			$obj = new SQLField(array(
	"m_strName" => "uom_code",
	"m_strTable" => "uoms"
));

$proto497["m_expr"]=$obj;
$proto497["m_alias"] = "";
$obj = new SQLFieldListItem($proto497);

$proto488["m_fieldlist"][]=$obj;
						$proto499=array();
			$obj = new SQLField(array(
	"m_strName" => "pack_uom_id",
	"m_strTable" => "uoms"
));

$proto499["m_expr"]=$obj;
$proto499["m_alias"] = "";
$obj = new SQLFieldListItem($proto499);

$proto488["m_fieldlist"][]=$obj;
$proto488["m_fromlist"] = array();
												$proto501=array();
$proto501["m_link"] = "SQLL_MAIN";
			$proto502=array();
$proto502["m_strName"] = "uoms";
$proto502["m_columns"] = array();
$proto502["m_columns"][] = "id";
$proto502["m_columns"][] = "uom_name";
$proto502["m_columns"][] = "uom_code";
$proto502["m_columns"][] = "pack_uom_id";
$obj = new SQLTable($proto502);

$proto501["m_table"] = $obj;
$proto501["m_alias"] = "";
$proto503=array();
$proto503["m_sql"] = "";
$proto503["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto503["m_column"]=$obj;
$proto503["m_contained"] = array();
$proto503["m_strCase"] = "";
$proto503["m_havingmode"] = "0";
$proto503["m_inBrackets"] = "0";
$proto503["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto503);

$proto501["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto501);

$proto488["m_fromlist"][]=$obj;
$proto488["m_groupby"] = array();
$proto488["m_orderby"] = array();
$obj = new SQLQuery($proto488);

$queryData_uoms = $obj;
$tdatauoms[".sqlquery"] = $queryData_uoms;

$tableEvents["uoms"] = new eventsBase;

?>
